class EntryController < ApplicationController
 # Get information on a new product and
  # attempt to create a row in the database.
  def create
    @entry = Entry.new(@params[:entry])
    if @entry.save
      flash['notice'] = 'Entry was successfully created.'
      redirect_to :action => 'list',:id=>@entry.id
    else
      render_action 'new'
    end
  end

  def list
   # @entry_pages, @entries = paginate :entry,:per_page => 10
# @entry = Entry.new
   @entry = Picture.find(params[:id])
    
  end

  # Initiate the creation of a new product.
  # The work is completed in #create.
  def new
    @entry = Entry.new
  end

end
